package org.bastion.domain.adapter

import org.bastion.domain.message.AlertMessage
import org.bastion.domain.message.DomainMessage
import org.bastion.domain.service.AlertService

class AlertAdapter(service: AlertService) extends Adapter {

  override def handle(message: DomainMessage) {
    message match {
      case alertMessage: AlertMessage => {
        println("AlertAdapter.handle, message = " + alertMessage.text)
        service.alert(alertMessage.text)
        alertMessage.dummyStatus = 1
      }
    }
  }

}
